package com.example.myapp.base;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.Nullable;

public abstract class BaseFragment extends Fragment {

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        View rootview=inflater.inflate(contentView(),container,false);


        initView(rootview);
        bindData();
        bindEvent();

        return rootview;
    }

    protected abstract void initView(View rootview);

    protected abstract int contentView();

    protected abstract void bindEvent();

    protected abstract void bindData();


}
